<html>
    <head>
    <link rel="stylesheet" href="lmm.css" type="text/css" />
    </head>
<body class="lmm">
<!-- This file is part of the Lisp Machine Manual.  -*-Text-*- -->
<!-- Function Description: Symbols -->
<!-- Remember to go back and try to figure out INTERN and REMOB. -->
<p class='cindent'><!-- "symbol" -->
<div class='chapter' id='8'>8. Symbols</div><div class='section' id='8.1'>8.1 The Value Cell</div><p class='cindent'><!-- "value cell" -->
	Each symbol has associated with it a <!-- open: 1, close: 0 --><font class="italic">value cell</font><!-- open: 1, close: 1 --> <!-- MATCHED MATCHED MATCHED -->, which refers
to one Lisp object.  This object is called the symbol's <!-- open: 2, close: 1 --><font class="italic">binding</font><!-- open: 2, close: 2 --> <!-- MATCHED MATCHED MATCHED --> or <!-- open: 3, close: 2 --><font class="italic">value</font><!-- open: 3, close: 3 --> <!-- MATCHED MATCHED MATCHED -->,
since it is what you get when you evaluate the symbol.  The binding of symbols to values
allows symbols to be used as the implementation of <!-- open: 4, close: 3 --><font class="italic">variables</font><!-- open: 4, close: 4 --> <!-- MATCHED MATCHED MATCHED --> in programs.

	The value cell can also be <!-- open: 5, close: 4 --><font class="italic">empty</font><!-- open: 5, close: 5 --> <!-- MATCHED MATCHED MATCHED -->, referring to <!-- open: 6, close: 5 --><font class="italic">no</font><!-- open: 6, close: 6 --> <!-- MATCHED MATCHED MATCHED --> Lisp
object, in which case the symbol is said to be <!-- open: 7, close: 6 --><font class="italic">unbound</font><!-- open: 7, close: 7 --> <!-- MATCHED MATCHED MATCHED -->.  This is the initial
state of a symbol when it is created.  An attempt to evaluate an unbound symbol
causes an error.

	The binding of a symbol can be changed either by <!-- open: 8, close: 7 --><font class="italic">lambda-binding</font><!-- open: 8, close: 8 --> <!-- MATCHED MATCHED MATCHED --> or by
<!-- open: 9, close: 8 --><font class="italic">assignment</font><!-- open: 9, close: 9 --> <!-- MATCHED MATCHED MATCHED -->.  The difference is that when a symbol is lambda-bound, its previous
value is saved away, to be restored later, whereas assignment discards the previous
value.

	The symbols <!-- open: 10, close: 9 --><font class="lisp">nil</font><!-- open: 10, close: 10 --> <!-- MATCHED MATCHED MATCHED --> and <!-- open: 11, close: 10 --><font class="lisp">t</font><!-- open: 11, close: 11 --> <!-- MATCHED MATCHED MATCHED --> are always bound to themselves; they
may not be assigned nor lambda-bound.  (The error of changing the value of 
<!-- open: 12, close: 11 --><font class="lisp">t</font><!-- open: 12, close: 12 --> <!-- MATCHED MATCHED MATCHED --> or <!-- open: 13, close: 12 --><font class="lisp">nil</font><!-- open: 13, close: 13 --> <!-- MATCHED MATCHED MATCHED --> is not yet detected, but it will be.)

	When <!-- open: 14, close: 13 --><font class="italic">closures</font><!-- open: 14, close: 14 --> <!-- MATCHED MATCHED MATCHED --> are in use, the situation is a little more complicated.
See the section on closures.

	When a Lisp function is <!-- open: 15, close: 14 --><font class="italic">compiled</font><!-- open: 15, close: 15 --> <!-- MATCHED MATCHED MATCHED -->, most of its variables are compiled
into <!-- open: 16, close: 15 --><font class="italic">local variables</font><!-- open: 16, close: 16 --> <!-- MATCHED MATCHED MATCHED -->, which are not represented by means of symbols.  However
the compiler recognizes usage of the <!-- open: 17, close: 16 --><font class="lisp">setq</font><!-- open: 17, close: 17 --> <!-- MATCHED MATCHED MATCHED --> special form, and of the <!-- open: 18, close: 17 --><font class="lisp">set</font><!-- open: 18, close: 18 --> <!-- MATCHED MATCHED MATCHED -->
and <!-- open: 19, close: 18 --><font class="lisp">value-cell-location</font><!-- open: 19, close: 19 --> <!-- MATCHED MATCHED MATCHED --> functions with a quoted argument, as referring to
variables rather than symbols, and generates the appropriate code to access the
corresponding local variable rather than the symbol.

<div class='defspec' id='defvar symbol &optional initial-value'><font class='exdent'><font class='funcname' id='defvar symbol &optional initial-value'>defvar symbol &optional initial-value</font><font class="italic"> Special Form</font></br></font><!-- end font_exdent --><!-- open: 20, close: 19 --><font class="lisp">defvar</font><!-- open: 20, close: 20 --> <!-- MATCHED MATCHED MATCHED --> is the recommended way to declare the use of a global variable in a
program.  Placed at top level in a file, it serves to initialize the variable,
declare it special for the sake of compilation, and record the location for the
sake of the editor so that you can ask to see where the variable is defined.
It also provides a good place to put a comment describing the meaning of the
variable (whereas an ordinary <!-- open: 21, close: 20 --><font class="lisp">declare</font><!-- open: 21, close: 21 --> <!-- MATCHED MATCHED MATCHED --> offers the temptation to declare
several variables at once and not have room to describe them all).
If the variable has a value already, that value is not changed.
If <!-- open: 22, close: 21 --><font class="italic">initial-value</font><!-- open: 22, close: 22 --> <!-- MATCHED MATCHED MATCHED --> is omitted, the variable is left unbound.
<!-- open: 23, close: 22 --><font class="lisp">defvar</font><!-- open: 23, close: 23 --> <!-- MATCHED MATCHED MATCHED --> should be used only at top level, never in function definitions,
and only for global variables (used by more than one function).
<!-- open: 24, close: 23 --><font class="lisp">(defvar foo 'bar)</font><!-- open: 24, close: 24 --> <!-- MATCHED MATCHED MATCHED --> is equivalent to
<pre class='lisp'>
(declare (special foo))
(or (boundp 'foo)
    (setq foo 'bar))
</pre>
</div>

<div class='defun' id='set'>
  <font class='exdent'>
    <font class='funcname'>set </font>
    <font class='italic' color='purple'>symbol value</font>
  </font><br>
<!-- open: 25, close: 24 --><font class="lisp">set</font><!-- open: 25, close: 25 --> <!-- MATCHED MATCHED MATCHED --> is the primitive for assignment of symbols.  The <!-- open: 26, close: 25 --><font class="italic">symbol</font><!-- open: 26, close: 26 --> <!-- MATCHED MATCHED MATCHED -->'s value
is changed to <!-- open: 27, close: 26 --><font class="italic">value</font><!-- open: 27, close: 27 --> <!-- MATCHED MATCHED MATCHED -->; <!-- open: 28, close: 27 --><font class="italic">value</font><!-- open: 28, close: 28 --> <!-- MATCHED MATCHED MATCHED --> may be any Lisp object.  <!-- open: 29, close: 28 --><font class="italic">set</font><!-- open: 29, close: 29 --> <!-- MATCHED MATCHED MATCHED --> returns
<!-- open: 30, close: 29 --><font class="italic">value</font><!-- open: 30, close: 30 --> <!-- MATCHED MATCHED MATCHED -->.
<pre class='lisp'>
<font class='exdent'>Example:
</font><!-- exdent -->(set (cond ((eq a b) 'c)
           (t 'd))
     'foo)
</pre>
will either set <!-- open: 31, close: 30 --><font class="lisp">c</font><!-- open: 31, close: 31 --> <!-- MATCHED MATCHED MATCHED --> to <!-- open: 32, close: 31 --><font class="lisp">foo</font><!-- open: 32, close: 32 --> <!-- MATCHED MATCHED MATCHED --> or set <!-- open: 33, close: 32 --><font class="lisp">d</font><!-- open: 33, close: 33 --> <!-- MATCHED MATCHED MATCHED --> to <!-- open: 34, close: 33 --><font class="lisp">foo</font><!-- open: 34, close: 34 --> <!-- MATCHED MATCHED MATCHED -->.
</div>

<div class='defspec' id='setq'><font class='exdent'><font class='funcname' id='setq'>setq</font><font class="italic"> Special Form</font></br></font><!-- end font_exdent -->The special form <!-- open: 35, close: 34 --><font class="lisp">(setq <!-- open: 36, close: 34 --><font class="italic">var1 form1 var2 form2...</font><!-- open: 36, close: 35 -->)</font><!-- open: 36, close: 36 --> <!-- MATCHED MATCHED MATCHED --> is the
"variable assignment statement" of Lisp.  First <!-- open: 37, close: 36 --><font class="italic">form1</font><!-- open: 37, close: 37 --> <!-- MATCHED MATCHED MATCHED --> is evaluated
and the result is assigned to <!-- open: 38, close: 37 --><font class="italic">var1</font><!-- open: 38, close: 38 --> <!-- MATCHED MATCHED MATCHED -->, using <!-- open: 39, close: 38 --><font class="lisp">set</font><!-- open: 39, close: 39 --> <!-- MATCHED MATCHED MATCHED -->, then <!-- open: 40, close: 39 --><font class="italic">form2</font><!-- open: 40, close: 40 --> <!-- MATCHED MATCHED MATCHED -->
is evaluated and the result is assigned to <!-- open: 41, close: 40 --><font class="italic">var2</font><!-- open: 41, close: 41 --> <!-- MATCHED MATCHED MATCHED -->, and so forth.
<!-- open: 42, close: 41 --><font class="lisp">setq</font><!-- open: 42, close: 42 --> <!-- MATCHED MATCHED MATCHED --> returns the last value assigned, i.e. the result of the
evaluation of its last argument.
<pre class='lisp'>
<font class='exdent'>Example:
</font><!-- exdent -->(setq x (+ 3 2 1) y (cons x nil))
</pre>
<!-- open: 43, close: 42 --><font class="lisp">x</font><!-- open: 43, close: 43 --> <!-- MATCHED MATCHED MATCHED --> is set to <!-- open: 44, close: 43 --><font class="lisp">6</font><!-- open: 44, close: 44 --> <!-- MATCHED MATCHED MATCHED -->, <!-- open: 45, close: 44 --><font class="lisp">y</font><!-- open: 45, close: 45 --> <!-- MATCHED MATCHED MATCHED --> is set to <!-- open: 46, close: 45 --><font class="lisp">(6)</font><!-- open: 46, close: 46 --> <!-- MATCHED MATCHED MATCHED -->, and the <!-- open: 47, close: 46 --><font class="lisp">setq</font><!-- open: 47, close: 47 --> <!-- MATCHED MATCHED MATCHED -->
returns <!-- open: 48, close: 47 --><font class="lisp">(6)</font><!-- open: 48, close: 48 --> <!-- MATCHED MATCHED MATCHED -->.  Note that the first assignment was performed before
the second form was evaluated, allowing that form to use the new value of <!-- open: 49, close: 48 --><font class="lisp">x</font><!-- open: 49, close: 49 --> <!-- MATCHED MATCHED MATCHED -->.
</div>

<div class='defmac' id='psetq'><font class='exdent'><font class='funcname' id='psetq'>psetq</font><font class="italic"> Macro</font></br></font><!-- end font_exdent -->A <!-- open: 50, close: 49 --><font class="lisp">psetq</font><!-- open: 50, close: 50 --> <!-- MATCHED MATCHED MATCHED --> form is just like a <!-- open: 51, close: 50 --><font class="lisp">setq</font><!-- open: 51, close: 51 --> <!-- MATCHED MATCHED MATCHED --> form, except
that the assignments happen in parallel; first all of the forms
are evaluated, and then the symbols are set to the resulting
values.
<pre class='lisp'>
<font class='exdent'>Example:
</font><!-- exdent -->(setq a 1)
(setq b 2)
(psetq a b b a)
a =&gt; 2
b =&gt; 1
</pre>
</div>

<div class='defun' id='symeval'>
  <font class='exdent'>
    <font class='funcname'>symeval </font>
    <font class='italic' color='purple'>sym</font>
  </font><br>
<!-- open: 52, close: 51 --><font class="lisp">symeval</font><!-- open: 52, close: 52 --> <!-- MATCHED MATCHED MATCHED --> is the basic primitive for retrieving a symbols's value.
<!-- open: 53, close: 52 --><font class="lisp">(symeval <!-- open: 54, close: 52 --><font class="italic">sym</font><!-- open: 54, close: 53 -->)</font><!-- open: 54, close: 54 --> <!-- MATCHED MATCHED MATCHED --> returns <!-- open: 55, close: 54 --><font class="italic">sym</font><!-- open: 55, close: 55 --> <!-- MATCHED MATCHED MATCHED -->'s current binding.
This is the function called by <!-- open: 56, close: 55 --><font class="lisp">eval</font><!-- open: 56, close: 56 --> <!-- MATCHED MATCHED MATCHED --> when it is given a symbol
to evaluate.  If the symbol is unbound, then <!-- open: 57, close: 56 --><font class="lisp">symeval</font><!-- open: 57, close: 57 --> <!-- MATCHED MATCHED MATCHED --> causes 
an error.
</div>

<div class='defun' id='boundp'>
  <font class='exdent'>
    <font class='funcname'>boundp </font>
    <font class='italic' color='purple'>sym</font>
  </font><br>
<!-- open: 58, close: 57 --><font class="lisp">boundp</font><!-- open: 58, close: 58 --> <!-- MATCHED MATCHED MATCHED --> returns <!-- open: 59, close: 58 --><font class="lisp">t</font><!-- open: 59, close: 59 --> <!-- MATCHED MATCHED MATCHED --> if <!-- open: 60, close: 59 --><font class="italic">sym</font><!-- open: 60, close: 60 --> <!-- MATCHED MATCHED MATCHED --> is bound; otherwise, it returns <!-- open: 61, close: 60 --><font class="lisp">nil</font><!-- open: 61, close: 61 --> <!-- MATCHED MATCHED MATCHED -->.
</div>

<div class='defun' id='makunbound'>
  <font class='exdent'>
    <font class='funcname'>makunbound </font>
    <font class='italic' color='purple'>sym</font>
  </font><br>
<!-- open: 62, close: 61 --><font class="lisp">makunbound</font><!-- open: 62, close: 62 --> <!-- MATCHED MATCHED MATCHED --> causes <!-- open: 63, close: 62 --><font class="italic">sym</font><!-- open: 63, close: 63 --> <!-- MATCHED MATCHED MATCHED --> to become unbound.
<pre class='lisp'>
<font class='exdent'>Example:
</font><!-- exdent -->(setq a 1)
a =&gt; 1
(makunbound 'a)
a =&gt; <!-- open: 64, close: 63 --><font class="main">causes an error.</font><!-- open: 64, close: 64 --> <!-- MATCHED MATCHED MATCHED -->
</pre>
<!-- open: 65, close: 64 --><font class="lisp">makunbound</font><!-- open: 65, close: 65 --> <!-- MATCHED MATCHED MATCHED --> returns its argument.
</div>

<div class='defun' id='value-cell-location'>
  <font class='exdent'>
    <font class='funcname'>value-cell-location </font>
    <font class='italic' color='purple'>sym</font>
  </font><br>
<!-- open: 66, close: 65 --><font class="lisp">value-cell-location</font><!-- open: 66, close: 66 --> <!-- MATCHED MATCHED MATCHED --> returns a locative pointer to <!-- open: 67, close: 66 --><font class="italic">sym</font><!-- open: 67, close: 67 --> <!-- MATCHED MATCHED MATCHED -->'s value cell.
See the section on locatives.

[Must explain about external vs internal value cell.]
</div>

<div class='section' id='8.2'>8.2 The Function Cell</div><p class='cindent'><!-- "function cell" -->
	Every symbol also has associated with it a <!-- open: 68, close: 67 --><font class="italic">function cell</font><!-- open: 68, close: 68 --> <!-- MATCHED MATCHED MATCHED -->.  The <!-- open: 69, close: 68 --><font class="italic">function</font><!-- open: 69, close: 69 --> <!-- MATCHED MATCHED MATCHED -->
cell is similar to the <!-- open: 70, close: 69 --><font class="italic">value</font><!-- open: 70, close: 70 --> <!-- MATCHED MATCHED MATCHED --> cell; it refers to a Lisp object.
When a function is referred to by name, that is, when a symbol is <!-- open: 71, close: 70 --><font class="italic">applied</font><!-- open: 71, close: 71 --> <!-- MATCHED MATCHED MATCHED -->
or appears as the car of a form to be evaluated, that symbol's function cell
is used to find its <!-- open: 72, close: 71 --><font class="italic">definition</font><!-- open: 72, close: 72 --> <!-- MATCHED MATCHED MATCHED -->, the functional object which is to be applied.
For example, when evaluating <!-- open: 73, close: 72 --><font class="lisp">(+ 5 6)</font><!-- open: 73, close: 73 --> <!-- MATCHED MATCHED MATCHED -->, 
the evaluator looks in <!-- open: 74, close: 73 --><font class="lisp">+</font><!-- open: 74, close: 74 --> <!-- MATCHED MATCHED MATCHED -->'s function cell to find the definition of <!-- open: 75, close: 74 --><font class="lisp">+</font><!-- open: 75, close: 75 --> <!-- MATCHED MATCHED MATCHED -->,
in this case a <!-- open: 76, close: 75 --><font class="italic">FEF</font><!-- open: 76, close: 76 --> <!-- MATCHED MATCHED MATCHED --> containing a compiled program, to apply to 5 and 6.
	Maclisp does not have function cells; instead, it looks for special
properties on the property list.  This is one of the major incompatibilities
between the two dialects.
	Like the value cell, a function cell can be empty, and it can be lambda-bound
or assigned.  The following functions are analogous to the value-cell related
functions in the previous section.

<div class='defun' id='fsymeval'>
  <font class='exdent'>
    <font class='funcname'>fsymeval </font>
    <font class='italic' color='purple'>sym</font>
  </font><br>
<!-- open: 77, close: 76 --><font class="lisp">fsymeval</font><!-- open: 77, close: 77 --> <!-- MATCHED MATCHED MATCHED --> returns <!-- open: 78, close: 77 --><font class="italic">sym</font><!-- open: 78, close: 78 --> <!-- MATCHED MATCHED MATCHED -->'s definition, the contents of its function cell.
If the function cell is empty, <!-- open: 79, close: 78 --><font class="lisp">fsymeval</font><!-- open: 79, close: 79 --> <!-- MATCHED MATCHED MATCHED --> causes an error.
</div>

<div class='defun' id='fset'>
  <font class='exdent'>
    <font class='funcname'>fset </font>
    <font class='italic' color='purple'>sym x</font>
  </font><br>
<!-- open: 80, close: 79 --><font class="lisp">fset</font><!-- open: 80, close: 80 --> <!-- MATCHED MATCHED MATCHED --> stores <!-- open: 81, close: 80 --><font class="italic">x</font><!-- open: 81, close: 81 --> <!-- MATCHED MATCHED MATCHED -->, which may be any Lisp object, into <!-- open: 82, close: 81 --><font class="italic">sym</font><!-- open: 82, close: 82 --> <!-- MATCHED MATCHED MATCHED -->'s
function cell.  It returns <!-- open: 83, close: 82 --><font class="italic">x</font><!-- open: 83, close: 83 --> <!-- MATCHED MATCHED MATCHED -->.
</div>

<div class='defun' id='fboundp'>
  <font class='exdent'>
    <font class='funcname'>fboundp </font>
    <font class='italic' color='purple'>sym</font>
  </font><br>
<!-- open: 84, close: 83 --><font class="lisp">fboundp</font><!-- open: 84, close: 84 --> <!-- MATCHED MATCHED MATCHED --> returns <!-- open: 85, close: 84 --><font class="lisp">nil</font><!-- open: 85, close: 85 --> <!-- MATCHED MATCHED MATCHED --> if <!-- open: 86, close: 85 --><font class="italic">sym</font><!-- open: 86, close: 86 --> <!-- MATCHED MATCHED MATCHED -->'s function cell is empty,
i.e. <!-- open: 87, close: 86 --><font class="italic">sym</font><!-- open: 87, close: 87 --> <!-- MATCHED MATCHED MATCHED --> is undefined.
Otherwise it returns <!-- open: 88, close: 87 --><font class="lisp">t</font><!-- open: 88, close: 88 --> <!-- MATCHED MATCHED MATCHED -->.
</div>

<div class='defun' id='fmakunbound'>
  <font class='exdent'>
    <font class='funcname'>fmakunbound </font>
    <font class='italic' color='purple'>sym</font>
  </font><br>
<!-- open: 89, close: 88 --><font class="lisp">fmakunbound</font><!-- open: 89, close: 89 --> <!-- MATCHED MATCHED MATCHED --> causes <!-- open: 90, close: 89 --><font class="italic">sym</font><!-- open: 90, close: 90 --> <!-- MATCHED MATCHED MATCHED -->'s to be undefined, i.e. its
function cell to be empty.
It returns <!-- open: 91, close: 90 --><font class="italic">sym</font><!-- open: 91, close: 91 --> <!-- MATCHED MATCHED MATCHED -->.
</div>

<div class='defun' id='function-cell-location'>
  <font class='exdent'>
    <font class='funcname'>function-cell-location </font>
    <font class='italic' color='purple'>sym</font>
  </font><br>
<!-- open: 92, close: 91 --><font class="lisp">function-cell-location</font><!-- open: 92, close: 92 --> <!-- MATCHED MATCHED MATCHED --> returns a locative pointer to <!-- open: 93, close: 92 --><font class="italic">sym</font><!-- open: 93, close: 93 --> <!-- MATCHED MATCHED MATCHED -->'s function
cell.  See the section on locatives.
</div>

<p class='cindent'><!-- "definition" -->
	The usual means of putting a function in a symbol's function
cell (<!-- open: 94, close: 93 --><font class="italic">defining</font><!-- open: 94, close: 94 --> <!-- MATCHED MATCHED MATCHED --> the symbol) is by means of the <!-- open: 95, close: 94 --><font class="lisp">defun</font><!-- open: 95, close: 95 --> <!-- MATCHED MATCHED MATCHED --> special
form.  Macros are put in a symbol's function cell by means of the
<!-- open: 96, close: 95 --><font class="lisp">macro</font><!-- open: 96, close: 96 --> <!-- MATCHED MATCHED MATCHED --> special form.  Substitutable functions can be put there with the
<!-- open: 97, close: 96 --><font class="lisp">defsubst</font><!-- open: 97, close: 97 --> <!-- MATCHED MATCHED MATCHED --> special form.  Anything else requires the <!-- open: 98, close: 97 --><font class="lisp">deff</font><!-- open: 98, close: 98 --> <!-- MATCHED MATCHED MATCHED --> special form.

<div class='defspec' id='defun'><font class='exdent'><font class='funcname' id='defun'>defun</font><font class="italic"> Special Form</font></br></font><!-- end font_exdent --><!-- open: 99, close: 98 --><font class="lisp">defun</font><!-- open: 99, close: 99 --> <!-- MATCHED MATCHED MATCHED --> is used for defining functions.  A
<!-- open: 100, close: 99 --><font class="lisp">defun</font><!-- open: 100, close: 100 --> <!-- MATCHED MATCHED MATCHED --> form looks like:
<pre class='lisp'>
(defun <!-- open: 101, close: 100 --><font class="italic">name type lambda-list
       body</font><!-- open: 101, close: 101 --> <!-- MATCHED MATCHED MATCHED -->)
</pre>
The <!-- open: 102, close: 101 --><font class="italic">type</font><!-- open: 102, close: 102 --> <!-- MATCHED MATCHED MATCHED --> is only for Maclisp
compatibility, and is optional and usually absent.  The <!-- open: 103, close: 102 --><font class="italic">lambda-list</font><!-- open: 103, close: 103 --> <!-- MATCHED MATCHED MATCHED -->
is as described on <a href='i_lisp.html#lambda-list'>this link</a> and may contain "&amp;-keywords".
<pre class='lisp'>
<font class='exdent'>Examples:
</font><!-- exdent -->(defun addone (x)
       (1+ x))

(defun foo (a &amp;optional (b 5) c &amp;rest e &amp;aux j)
	(setq j (+ a b))
	(cond ((not (null c))
	       (cons j e))
	      (t j))) 
</pre>
	A list  <!-- open: 104, close: 103 --><font class="lisp">(named-lambda <!-- open: 105, close: 103 --><font class="italic">name</font><!-- open: 105, close: 104 --> <!-- open: 106, close: 104 --><font class="italic">lambda-list . body</font><!-- open: 106, close: 105 -->)</font><!-- open: 106, close: 106 --> <!-- MATCHED MATCHED MATCHED --> is left in 
the function cell of <!-- open: 107, close: 106 --><font class="italic">name</font><!-- open: 107, close: 107 --> <!-- MATCHED MATCHED MATCHED -->.

	For compatibility, the Maclisp <!-- open: 108, close: 107 --><font class="italic">type</font><!-- open: 108, close: 108 --> <!-- MATCHED MATCHED MATCHED -->s <!-- open: 109, close: 108 --><font class="lisp">expr</font><!-- open: 109, close: 109 --> <!-- MATCHED MATCHED MATCHED -->, <!-- open: 110, close: 109 --><font class="lisp">fexpr</font><!-- open: 110, close: 110 --> <!-- MATCHED MATCHED MATCHED -->, and <!-- open: 111, close: 110 --><font class="lisp">macro</font><!-- open: 111, close: 111 --> <!-- MATCHED MATCHED MATCHED -->,
and Maclisp <!-- open: 112, close: 111 --><font class="italic">lexprs</font><!-- open: 112, close: 112 --> <!-- MATCHED MATCHED MATCHED --> (which have an atomic lambda-list)
are recognized and the corresponding Lisp Machine flavor of <!-- open: 113, close: 112 --><font class="lisp">defun</font><!-- open: 113, close: 113 --> <!-- MATCHED MATCHED MATCHED --> is assumed.
</div>

<div class='defspec' id='defsubst'><font class='exdent'><font class='funcname' id='defsubst'>defsubst</font><font class="italic"> Special Form</font></br></font><!-- end font_exdent --><!-- open: 114, close: 113 --><font class="lisp">defsubst</font><!-- open: 114, close: 114 --> <!-- MATCHED MATCHED MATCHED --> is used for defining substitutable functions.  It is used just
like <!-- open: 115, close: 114 --><font class="lisp">defun</font><!-- open: 115, close: 115 --> <!-- MATCHED MATCHED MATCHED -->
<pre class='lisp'>
(defsubst <!-- open: 116, close: 115 --><font class="italic">name</font><!-- open: 116, close: 116 --> <!-- MATCHED MATCHED MATCHED --> <!-- open: 117, close: 116 --><font class="italic">lambda-list</font><!-- open: 117, close: 117 --> <!-- MATCHED MATCHED MATCHED --> . <!-- open: 118, close: 117 --><font class="italic">body</font><!-- open: 118, close: 118 --> <!-- MATCHED MATCHED MATCHED -->)
</pre>
and does almost the same thing.  It defines a function which executes
identically to the one which a similar call to <!-- open: 119, close: 118 --><font class="italic">defun</font><!-- open: 119, close: 119 --> <!-- MATCHED MATCHED MATCHED --> would define.  The
difference comes when a function which <!-- open: 120, close: 119 --><font class="italic">calls</font><!-- open: 120, close: 120 --> <!-- MATCHED MATCHED MATCHED --> this one is compiled.  Then,
the call will be open-coded by substituting the substitutable function's
definition into the code being compiled.  Substitutable
functions are a sort of cross between ordinary functions and macros; they can be
applied like functions, but act like macros for the compiler.  The actual
definition looks like <!-- open: 121, close: 120 --><font class="lisp">(subst <!-- open: 122, close: 120 --><font class="italic">lambda-list</font><!-- open: 122, close: 121 --> . <!-- open: 123, close: 121 --><font class="italic">body</font><!-- open: 123, close: 122 -->)</font><!-- open: 123, close: 123 --> <!-- MATCHED MATCHED MATCHED -->.  For example, if
we define
<pre class='lisp'>
(defsubst square (x) (* x x))

(defun foo (a b) (square (+ a b)))
</pre>
then if <!-- open: 124, close: 123 --><font class="lisp">foo</font><!-- open: 124, close: 124 --> <!-- MATCHED MATCHED MATCHED --> is used interpreted, <!-- open: 125, close: 124 --><font class="lisp">square</font><!-- open: 125, close: 125 --> <!-- MATCHED MATCHED MATCHED --> will work just as if it had
been defined by <!-- open: 126, close: 125 --><font class="lisp">defun</font><!-- open: 126, close: 126 --> <!-- MATCHED MATCHED MATCHED -->.  If <!-- open: 127, close: 126 --><font class="lisp">foo</font><!-- open: 127, close: 127 --> <!-- MATCHED MATCHED MATCHED --> is compiled, however, the squaring
will be substituted into it and it will compile just like
<pre class='lisp'>
(defun foo (a b) (* (+ a b) (+ a b)))
</pre>
You will notice that the substitution performed is very simple and takes no care
about the possibility of computing an argument twice when it really ought to be
computed once.  
</div>

<div class='defspec' id='macro'><font class='exdent'><font class='funcname' id='macro'>macro</font><font class="italic"> Special Form</font></br></font><!-- end font_exdent --><!-- open: 128, close: 127 --><font class="lisp">macro</font><!-- open: 128, close: 128 --> <!-- MATCHED MATCHED MATCHED --> is used for defining macros.  Its form is:
<pre class='lisp'>
(macro <!-- open: 129, close: 128 --><font class="italic">name</font><!-- open: 129, close: 129 --> <!-- MATCHED MATCHED MATCHED --> (<!-- open: 130, close: 129 --><font class="italic">arg</font><!-- open: 130, close: 130 --> <!-- MATCHED MATCHED MATCHED -->)
       <!-- open: 131, close: 130 --><font class="italic">body</font><!-- open: 131, close: 131 --> <!-- MATCHED MATCHED MATCHED -->)
</pre>
<pre class='lisp'>
<font class='exdent'>Examples:
</font><!-- exdent -->(macro addone (x)
       (list '1+ (cadr x)))

(macro increment (x)
       (list 'setq (cadr x) (list '1+ (cadr x))))
</pre>
	In the function cell of <!-- open: 132, close: 131 --><font class="italic">name</font><!-- open: 132, close: 132 --> <!-- MATCHED MATCHED MATCHED --> is placed a cons whose car is
the symbol <!-- open: 133, close: 132 --><font class="lisp">macro</font><!-- open: 133, close: 133 --> <!-- MATCHED MATCHED MATCHED -->, and whose cdr is a <!-- open: 134, close: 133 --><font class="lisp">lambda</font><!-- open: 134, close: 134 --> <!-- MATCHED MATCHED MATCHED -->-expression of the
form <!-- open: 135, close: 134 --><font class="lisp">(lambda (<!-- open: 136, close: 134 --><font class="italic">arg</font><!-- open: 136, close: 135 -->) . <!-- open: 137, close: 135 --><font class="italic">body</font><!-- open: 137, close: 136 -->)</font><!-- open: 137, close: 137 --> <!-- MATCHED MATCHED MATCHED -->.
	Much of the time it is more convenient and clear to use a macro-defining
macro such as <!-- open: 138, close: 137 --><font class="lisp">defmacro</font><!-- open: 138, close: 138 --> <!-- MATCHED MATCHED MATCHED --> (see <font color='red'>LINK:(</font>defmacro-fun)) to define macros.
</div>

<div class='defspec' id='deff'><font class='exdent'><font class='funcname' id='deff'>deff</font><font class="italic"> Special Form</font></br></font><!-- end font_exdent --><!-- open: 139, close: 138 --><font class="lisp">deff</font><!-- open: 139, close: 139 --> <!-- MATCHED MATCHED MATCHED --> is used for giving a function a definition which is not obtainable
with the specific defining forms such as <!-- open: 140, close: 139 --><font class="lisp">defun</font><!-- open: 140, close: 140 --> <!-- MATCHED MATCHED MATCHED --> and <!-- open: 141, close: 140 --><font class="lisp">macro</font><!-- open: 141, close: 141 --> <!-- MATCHED MATCHED MATCHED -->.  It looks
like
<pre class='lisp'>
(deff <!-- open: 142, close: 141 --><font class="italic">name</font><!-- open: 142, close: 142 --> <!-- MATCHED MATCHED MATCHED --> <!-- open: 143, close: 142 --><font class="italic">definition</font><!-- open: 143, close: 143 --> <!-- MATCHED MATCHED MATCHED -->)
</pre>
where <!-- open: 144, close: 143 --><font class="italic">definition</font><!-- open: 144, close: 144 --> <!-- MATCHED MATCHED MATCHED --> is <!-- open: 145, close: 144 --><font class="italic">evaluated</font><!-- open: 145, close: 145 --> <!-- MATCHED MATCHED MATCHED --> so you can get any object you want.
For example,
<pre class='lisp'>
(deff foo 'bar)
</pre>
will make <!-- open: 146, close: 145 --><font class="lisp">foo</font><!-- open: 146, close: 146 --> <!-- MATCHED MATCHED MATCHED --> equivalent to <!-- open: 147, close: 146 --><font class="lisp">bar</font><!-- open: 147, close: 147 --> <!-- MATCHED MATCHED MATCHED -->, with an indirection so that if
<!-- open: 148, close: 147 --><font class="lisp">bar</font><!-- open: 148, close: 148 --> <!-- MATCHED MATCHED MATCHED --> changes <!-- open: 149, close: 148 --><font class="lisp">foo</font><!-- open: 149, close: 149 --> <!-- MATCHED MATCHED MATCHED --> will likewise change;
<pre class='lisp'>
(deff foo (function bar))
</pre>
copies the definition of <!-- open: 150, close: 149 --><font class="lisp">bar</font><!-- open: 150, close: 150 --> <!-- MATCHED MATCHED MATCHED --> into <!-- open: 151, close: 150 --><font class="lisp">foo</font><!-- open: 151, close: 151 --> <!-- MATCHED MATCHED MATCHED --> with no indirection, so that
further changes to <!-- open: 152, close: 151 --><font class="lisp">bar</font><!-- open: 152, close: 152 --> <!-- MATCHED MATCHED MATCHED --> will have no effect on <!-- open: 153, close: 152 --><font class="lisp">foo</font><!-- open: 153, close: 153 --> <!-- MATCHED MATCHED MATCHED -->.
</div>

<div class='defspec' id='def'><font class='exdent'><font class='funcname' id='def'>def</font><font class="italic"> Special Form</font></br></font><!-- end font_exdent -->[from what's explained here, nobody would understand why def is useful.
The whole section towards functions and definitions needs to be rewritten].
</div>

<div class='defun' id='fset-carefully'>
  <font class='exdent'>
    <font class='funcname'>fset-carefully </font>
    <font class='italic' color='purple'>symbol definition &optional force-flag</font>
  </font><br>
This is the same as <!-- open: 154, close: 153 --><font class="lisp">(fset <!-- open: 155, close: 153 --><font class="italic">symbol</font><!-- open: 155, close: 154 --> <!-- open: 156, close: 154 --><font class="italic">definition</font><!-- open: 156, close: 155 -->)</font><!-- open: 156, close: 156 --> <!-- MATCHED MATCHED MATCHED --> except that it
makes some checks and saves the old definition.  <!-- open: 157, close: 156 --><font class="lisp">defun</font><!-- open: 157, close: 157 --> <!-- MATCHED MATCHED MATCHED -->, <!-- open: 158, close: 157 --><font class="lisp">macro</font><!-- open: 158, close: 158 --> <!-- MATCHED MATCHED MATCHED -->,
<!-- open: 159, close: 158 --><font class="lisp">undefun</font><!-- open: 159, close: 159 --> <!-- MATCHED MATCHED MATCHED -->, <!-- open: 160, close: 159 --><font class="lisp">load</font><!-- open: 160, close: 160 --> <!-- MATCHED MATCHED MATCHED -->, and the compiler call <!-- open: 161, close: 160 --><font class="lisp">fset-carefully</font><!-- open: 161, close: 161 --> <!-- MATCHED MATCHED MATCHED --> when
they define functions.

<!-- open: 162, close: 161 --><font class="lisp">fset-carefully</font><!-- open: 162, close: 162 --> <!-- MATCHED MATCHED MATCHED --> prints a message and asks the user if the current
package (value of <!-- open: 163, close: 162 --><font class="lisp">package</font><!-- open: 163, close: 163 --> <!-- MATCHED MATCHED MATCHED -->) is not allowed to redefine the
<!-- open: 164, close: 163 --><font class="italic">symbol</font><!-- open: 164, close: 164 --> <!-- MATCHED MATCHED MATCHED -->.  Specifying <!-- open: 165, close: 164 --><font class="italic">force-flag</font><!-- open: 165, close: 165 --> <!-- MATCHED MATCHED MATCHED --> non-<!-- open: 166, close: 165 --><font class="lisp">nil</font><!-- open: 166, close: 166 --> <!-- MATCHED MATCHED MATCHED --> suppresses this
check.

The previous definition, if any, of <!-- open: 167, close: 166 --><font class="italic">symbol</font><!-- open: 167, close: 167 --> <!-- MATCHED MATCHED MATCHED --> is saved on the
<!-- open: 168, close: 167 --><font class="lisp">:previous-definition</font><!-- open: 168, close: 168 --> <!-- MATCHED MATCHED MATCHED --> property.  If it is a list, it is also saved
on the <!-- open: 169, close: 168 --><font class="lisp">:previous-expr-definition</font><!-- open: 169, close: 169 --> <!-- MATCHED MATCHED MATCHED --> property.  These properties are
used by the <!-- open: 170, close: 169 --><font class="lisp">undefun</font><!-- open: 170, close: 170 --> <!-- MATCHED MATCHED MATCHED --> function (<font color='red'>LINK:(</font>undefun-fun)), which restores the
previous definition, and the <!-- open: 171, close: 170 --><font class="lisp">uncompile</font><!-- open: 171, close: 171 --> <!-- MATCHED MATCHED MATCHED --> function (<font color='red'>LINK:(</font>uncompile-fun)),
which restores the previous interpreted definition.

If <!-- open: 172, close: 171 --><font class="italic">symbol</font><!-- open: 172, close: 172 --> <!-- MATCHED MATCHED MATCHED --> is not a symbol, but a list <!-- open: 173, close: 172 --><font class="lisp">(<!-- open: 174, close: 172 --><font class="italic">name</font><!-- open: 174, close: 173 --> <!-- open: 175, close: 173 --><font class="italic">prop</font><!-- open: 175, close: 174 -->)</font><!-- open: 175, close: 175 --> <!-- MATCHED MATCHED MATCHED -->,
then the definition is put on <!-- open: 176, close: 175 --><font class="italic">name</font><!-- open: 176, close: 176 --> <!-- MATCHED MATCHED MATCHED -->'s <!-- open: 177, close: 176 --><font class="italic">prop</font><!-- open: 177, close: 177 --> <!-- MATCHED MATCHED MATCHED --> property, the
package error check is not done, and the old definition is not saved.
This is used to implement the <!-- open: 178, close: 177 --><font class="lisp">(defun (<!-- open: 179, close: 177 --><font class="italic">name</font><!-- open: 179, close: 178 --> <!-- open: 180, close: 178 --><font class="italic">prop</font><!-- open: 180, close: 179 -->) ...)</font><!-- open: 180, close: 180 --> <!-- MATCHED MATCHED MATCHED --> feature.
</div>

<div class='defun' id='undefun'>
  <font class='exdent'>
    <font class='funcname'>undefun </font>
    <font class='italic' color='purple'>symbol</font>
  </font><br>
If <!-- open: 181, close: 180 --><font class="italic">symbol</font><!-- open: 181, close: 181 --> <!-- MATCHED MATCHED MATCHED --> has a <!-- open: 182, close: 181 --><font class="lisp">:previous-definition</font><!-- open: 182, close: 182 --> <!-- MATCHED MATCHED MATCHED --> property,
<!-- open: 183, close: 182 --><font class="lisp">undefun</font><!-- open: 183, close: 183 --> <!-- MATCHED MATCHED MATCHED --> interchanges it with <!-- open: 184, close: 183 --><font class="italic">symbol</font><!-- open: 184, close: 184 --> <!-- MATCHED MATCHED MATCHED -->'s function definition.
This undoes the effect of a <!-- open: 185, close: 184 --><font class="lisp">defun</font><!-- open: 185, close: 185 --> <!-- MATCHED MATCHED MATCHED -->, <!-- open: 186, close: 185 --><font class="lisp">compile</font><!-- open: 186, close: 186 --> <!-- MATCHED MATCHED MATCHED -->, etc.
</div>

<div class='defun' id='arglist'>
  <font class='exdent'>
    <font class='funcname'>arglist </font>
    <font class='italic' color='purple'>function &optional literal-flag</font>
  </font><br>
<!-- open: 187, close: 186 --><font class="lisp">arglist</font><!-- open: 187, close: 187 --> <!-- MATCHED MATCHED MATCHED --> is given a function, and returns its best guess at the nature of the function's
<!-- open: 188, close: 187 --><font class="italic">lambda</font><!-- open: 188, close: 188 --> <!-- MATCHED MATCHED MATCHED -->-list.
	If <!-- open: 189, close: 188 --><font class="italic">function</font><!-- open: 189, close: 189 --> <!-- MATCHED MATCHED MATCHED --> is a symbol, <!-- open: 190, close: 189 --><font class="lisp">arglist</font><!-- open: 190, close: 190 --> <!-- MATCHED MATCHED MATCHED -->
of its function definition is used.
	If the <!-- open: 191, close: 190 --><font class="italic">function</font><!-- open: 191, close: 191 --> <!-- MATCHED MATCHED MATCHED --> is an actual <!-- open: 192, close: 191 --><font class="italic">lambda</font><!-- open: 192, close: 192 --> <!-- MATCHED MATCHED MATCHED -->-expression,
its <!-- open: 193, close: 192 --><font class="italic">cadr</font><!-- open: 193, close: 193 --> <!-- MATCHED MATCHED MATCHED -->, the lambda-list, is returned.  But if <!-- open: 194, close: 193 --><font class="italic">function</font><!-- open: 194, close: 194 --> <!-- MATCHED MATCHED MATCHED -->
is compiled, <!-- open: 195, close: 194 --><font class="lisp">arglist</font><!-- open: 195, close: 195 --> <!-- MATCHED MATCHED MATCHED --> attempts to reconstruct the <!-- open: 196, close: 195 --><font class="italic">lambda</font><!-- open: 196, close: 196 --> <!-- MATCHED MATCHED MATCHED -->-list of the original
definition, using whatever debugging information was saved by the compiler.
Sometimes the actual names of the bound variables are not available, and
<!-- open: 197, close: 196 --><font class="lisp">arglist</font><!-- open: 197, close: 197 --> <!-- MATCHED MATCHED MATCHED --> uses the symbol <!-- open: 198, close: 197 --><font class="lisp">*unknown*</font><!-- open: 198, close: 198 --> <!-- MATCHED MATCHED MATCHED --> for these.  Also, sometimes
the initialization of an optional parameter is too complicated
for <!-- open: 199, close: 198 --><font class="lisp">arglist</font><!-- open: 199, close: 199 --> <!-- MATCHED MATCHED MATCHED --> to reconstruct; for these it returns the symbol
<!-- open: 200, close: 199 --><font class="lisp">*hairy*</font><!-- open: 200, close: 200 --> <!-- MATCHED MATCHED MATCHED -->.
	Some functions' real argument lists are not what would be most
descriptive to a user.  A function may take a &amp;rest argument for
technical reasons even though there are standard meanings for the
first element of that argument.  For such cases, the definition of the
function can specify a value to be returned when the user asks about
the argument list, with a <!-- open: 201, close: 200 --><font class="lisp">local-declare</font><!-- open: 201, close: 201 --> <!-- MATCHED MATCHED MATCHED -->.  Example:
<pre class='lisp'>
(def foo		;So the definition of foo can be found
  (local-declare ((arglist x y &amp;rest z))
    (defun foo (&amp;rest rest-arg) .....)))
</pre>
<!-- open: 202, close: 201 --><font class="lisp">literal-flag</font><!-- open: 202, close: 202 --> <!-- MATCHED MATCHED MATCHED --> allows the caller of <!-- open: 203, close: 202 --><font class="lisp">arglist</font><!-- open: 203, close: 203 --> <!-- MATCHED MATCHED MATCHED --> to say that
declared arglists of this sort should not be used.
	<!-- open: 204, close: 203 --><font class="lisp">arglist</font><!-- open: 204, close: 204 --> <!-- MATCHED MATCHED MATCHED --> cannot be relied upon to return the exactly
correct answer, since some of the information may have been lost.
Programs interested in how many and what kind of arguments there are
should use <!-- open: 205, close: 204 --><font class="lisp">args-info</font><!-- open: 205, close: 205 --> <!-- MATCHED MATCHED MATCHED --> instead.  <!-- open: 206, close: 205 --><font class="lisp">arglist</font><!-- open: 206, close: 206 --> <!-- MATCHED MATCHED MATCHED --> is a reliable way
of getting the names of the arguments, if that information is
available, provided the <!-- open: 207, close: 206 --><font class="lisp">literal-flag argument</font><!-- open: 207, close: 207 --> <!-- MATCHED MATCHED MATCHED --> is <!-- open: 208, close: 207 --><font class="lisp">t</font><!-- open: 208, close: 208 --> <!-- MATCHED MATCHED MATCHED -->.  This
inhibits use of <!-- open: 209, close: 208 --><font class="lisp">arglist</font><!-- open: 209, close: 209 --> <!-- MATCHED MATCHED MATCHED --> declarations.
</div>

<div class='defun' id='args-info'>
  <font class='exdent'>
    <font class='funcname'>args-info </font>
    <font class='italic' color='purple'>function</font>
  </font><br>
<!-- open: 210, close: 209 --><font class="lisp">args-info</font><!-- open: 210, close: 210 --> <!-- MATCHED MATCHED MATCHED --> returns a fixnum called the "numeric argument descriptor"
of the <!-- open: 211, close: 210 --><font class="italic">function</font><!-- open: 211, close: 211 --> <!-- MATCHED MATCHED MATCHED -->, which describes the way the function takes arguments.
The information in it is stored in various bits and byte fields in the
fixnum, which are referenced by the symbolic names shown below.
By the usual Lisp Machine convention, those starting with a single "%"
are bit-masks (meant to be <!-- open: 212, close: 211 --><font class="lisp">logand</font><!-- open: 212, close: 212 --> <!-- MATCHED MATCHED MATCHED -->ed with the number), and those
starting with "%%" are byte descriptors (meant to be used with <!-- open: 213, close: 212 --><font class="lisp">ldb</font><!-- open: 213, close: 213 --> <!-- MATCHED MATCHED MATCHED -->).
	Here are the fields:
<table>
<tr valign='top'><td colspan='2'><font class='lisp'> %arg-desc-quoted-rest</font></td><td><!-- empty --></td></tr>
<tr><td><!-- empty title --></td><td>If this bit is set, the function has a "rest" argument, and it is "quoted".
Most special forms have this bit.
</td></tr>
<tr valign='top'><td colspan='2'><font class='lisp'> %arg-desc-evaled-rest</font></td><td><!-- empty --></td></tr>
<tr><td><!-- empty title --></td><td>If this bit is set, the function has a "rest" argument, and it is not "quoted".
</td></tr>
<tr valign='top'><td colspan='2'><font class='lisp'> %arg-desc-fef-quote-hair</font></td><td><!-- empty --></td></tr>
<tr><td><!-- empty title --></td><td>If this bit is set, there are some quoted arguments other
than the "rest" argument (if any), and the pattern of quoting is too complicated
to describe here.  The ADL (Argument Description List) in the FEF should be consulted.
</td></tr>
<tr valign='top'><td colspan='2'><font class='lisp'> %arg-desc-interpreted</font></td><td><!-- empty --></td></tr>
<tr><td><!-- empty title --></td><td>This function is not a compiled-code object, and a numeric argument descriptor
cannot be computed.
Usually <!-- open: 214, close: 213 --><font class="lisp">args-info</font><!-- open: 214, close: 214 --> <!-- MATCHED MATCHED MATCHED --> will not return this bit, although <!-- open: 215, close: 214 --><font class="lisp">%args-info</font><!-- open: 215, close: 215 --> <!-- MATCHED MATCHED MATCHED --> will.
</td></tr>
<tr valign='top'><td colspan='2'><font class='lisp'> %arg-desc-fef-bind-hair</font></td><td><!-- empty --></td></tr>
<tr><td><!-- empty title --></td><td>There is argument initialization, or something else too
complicated to describe here.
The ADL (Argument Description List) in the FEF should be consulted.
</td></tr>
<tr valign='top'><td colspan='2'><font class='lisp'> %%arg-desc-min-args</font></td><td><!-- empty --></td></tr>
<tr><td><!-- empty title --></td><td>This is the minimum number of arguments which may be passed
to this function, i.e., the number of "required" parameters.
</td></tr>
<tr valign='top'><td colspan='2'><font class='lisp'> %%arg-desc-max-args</font></td><td><!-- empty --></td></tr>
<tr><td><!-- empty title --></td><td>This is the maximum number of arguments which may be passed
to this function, i.e., the sum of the number of "required"
parameters and the number of "optional" paramaters.
If there is a rest argument, this is not really the maximum
number of arguments which may be passed; an arbitrarily-large
number of arguments is permitted, subject to limitations on
the maximum size of a stack frame.
</td></tr><!-- item_ --></table><!-- end table -->


Note that <!-- open: 216, close: 215 --><font class="lisp">%arg-desc-quoted-rest</font><!-- open: 216, close: 216 --> <!-- MATCHED MATCHED MATCHED --> and <!-- open: 217, close: 216 --><font class="lisp">%arg-desc-evaled-rest</font><!-- open: 217, close: 217 --> <!-- MATCHED MATCHED MATCHED --> cannot both be set.
</div>

<div class='defun' id='%args-info'>
  <font class='exdent'>
    <font class='funcname'>%args-info </font>
    <font class='italic' color='purple'>function</font>
  </font><br>
This is an internal function of <!-- open: 218, close: 217 --><font class="lisp">args-info</font><!-- open: 218, close: 218 --> <!-- MATCHED MATCHED MATCHED -->; it is like <!-- open: 219, close: 218 --><font class="lisp">args-info</font><!-- open: 219, close: 219 --> <!-- MATCHED MATCHED MATCHED --> but only
works for compiled-code objects.  It exists because it has to be in the microcode
anyway, for <!-- open: 220, close: 219 --><font class="lisp">apply</font><!-- open: 220, close: 220 --> <!-- MATCHED MATCHED MATCHED -->.
</div>

<div class='section' id='8.3'>8.3 The Property List</div><p class='cindent'><!-- "property list" -->
<p class='cindent'><!-- "indicator" -->
<p class='cindent'><!-- "attribute" -->
	Every symbol has associated with it a <!-- open: 221, close: 220 --><font class="italic">property list</font><!-- open: 221, close: 221 --> <!-- MATCHED MATCHED MATCHED -->, which
is a list used for associating "attributes" with symbols.  A property
list has an even number of elements.  Each pair of elements constitutes a
<!-- open: 222, close: 221 --><font class="italic">property</font><!-- open: 222, close: 222 --> <!-- MATCHED MATCHED MATCHED -->;  the first of the pair is a symbol called the
<!-- open: 223, close: 222 --><font class="italic">indicator</font><!-- open: 223, close: 223 --> <!-- MATCHED MATCHED MATCHED -->, and the second is a Lisp object called the <!-- open: 224, close: 223 --><font class="italic">value</font><!-- open: 224, close: 224 --> <!-- MATCHED MATCHED MATCHED -->
or, more loosely, the <!-- open: 225, close: 224 --><font class="italic">property</font><!-- open: 225, close: 225 --> <!-- MATCHED MATCHED MATCHED -->.  The indicator serves as the name
of the property, and the value as the value of the property. Here is
an example of the property list of a symbol named <!-- open: 226, close: 225 --><font class="lisp">b1</font><!-- open: 226, close: 226 --> <!-- MATCHED MATCHED MATCHED --> which is
being used by a program which deals with blocks: 
<p class='cindent'><!-- "blocks" -->
<pre class='lisp'>
	(color blue on b6 associated-with (b2 b3 b4))
</pre>
	There are three properties, and so the list has six elements.
The first property's indicator is the symbol <!-- open: 227, close: 226 --><font class="lisp">color</font><!-- open: 227, close: 227 --> <!-- MATCHED MATCHED MATCHED -->, and its value
is the symbol <!-- open: 228, close: 227 --><font class="lisp">blue</font><!-- open: 228, close: 228 --> <!-- MATCHED MATCHED MATCHED -->.  One says that "the value of <!-- open: 229, close: 228 --><font class="lisp">b1</font><!-- open: 229, close: 229 --> <!-- MATCHED MATCHED MATCHED -->'s <!-- open: 230, close: 229 --><font class="lisp">color</font><!-- open: 230, close: 230 --> <!-- MATCHED MATCHED MATCHED -->
property is <!-- open: 231, close: 230 --><font class="lisp">blue</font><!-- open: 231, close: 231 --> <!-- MATCHED MATCHED MATCHED -->", or, informally, that "<!-- open: 232, close: 231 --><font class="lisp">b1</font><!-- open: 232, close: 232 --> <!-- MATCHED MATCHED MATCHED -->'s <!-- open: 233, close: 232 --><font class="lisp">color</font><!-- open: 233, close: 233 --> <!-- MATCHED MATCHED MATCHED --> property
is <!-- open: 234, close: 233 --><font class="lisp">blue</font><!-- open: 234, close: 234 --> <!-- MATCHED MATCHED MATCHED -->."  The program is probably representing the information that
the block represented by <!-- open: 235, close: 234 --><font class="lisp">b1</font><!-- open: 235, close: 235 --> <!-- MATCHED MATCHED MATCHED --> is blue.  Similarly, it is probably
representing in the rest of the property list that block <!-- open: 236, close: 235 --><font class="lisp">b1</font><!-- open: 236, close: 236 --> <!-- MATCHED MATCHED MATCHED --> is on
top of block <!-- open: 237, close: 236 --><font class="lisp">b6</font><!-- open: 237, close: 237 --> <!-- MATCHED MATCHED MATCHED -->, and that <!-- open: 238, close: 237 --><font class="lisp">b1</font><!-- open: 238, close: 238 --> <!-- MATCHED MATCHED MATCHED --> is associated with blocks
<!-- open: 239, close: 238 --><font class="lisp">b2</font><!-- open: 239, close: 239 --> <!-- MATCHED MATCHED MATCHED -->, <!-- open: 240, close: 239 --><font class="lisp">b3</font><!-- open: 240, close: 240 --> <!-- MATCHED MATCHED MATCHED -->, and <!-- open: 241, close: 240 --><font class="lisp">b4</font><!-- open: 241, close: 241 --> <!-- MATCHED MATCHED MATCHED -->.
	When a symbol is created, its property list is initially <!-- open: 242, close: 241 --><font class="lisp">nil</font><!-- open: 242, close: 242 --> <!-- MATCHED MATCHED MATCHED -->.
	Because of the existence of print-name, value, function, and package cells,
none of the Maclisp system property names (<!-- open: 243, close: 242 --><font class="lisp">expr</font><!-- open: 243, close: 243 --> <!-- MATCHED MATCHED MATCHED -->, <!-- open: 244, close: 243 --><font class="lisp">fexpr</font><!-- open: 244, close: 244 --> <!-- MATCHED MATCHED MATCHED -->, <!-- open: 245, close: 244 --><font class="lisp">macro</font><!-- open: 245, close: 245 --> <!-- MATCHED MATCHED MATCHED -->, <!-- open: 246, close: 245 --><font class="lisp">array</font><!-- open: 246, close: 246 --> <!-- MATCHED MATCHED MATCHED -->,
<!-- open: 247, close: 246 --><font class="lisp">subr</font><!-- open: 247, close: 247 --> <!-- MATCHED MATCHED MATCHED -->, <!-- open: 248, close: 247 --><font class="lisp">lsubr</font><!-- open: 248, close: 248 --> <!-- MATCHED MATCHED MATCHED -->, <!-- open: 249, close: 248 --><font class="lisp">fsubr</font><!-- open: 249, close: 249 --> <!-- MATCHED MATCHED MATCHED -->, and in former times <!-- open: 250, close: 249 --><font class="lisp">value</font><!-- open: 250, close: 250 --> <!-- MATCHED MATCHED MATCHED --> and
<!-- open: 251, close: 250 --><font class="lisp">pname</font><!-- open: 251, close: 251 --> <!-- MATCHED MATCHED MATCHED -->) exist in Lisp Machine lisp.  The compiler (see <a href='compil.html#compiler'>this link</a>)
and the editor use several properties, which are documented in those sections.

<p class='cindent'><!-- "disembodied property list" -->
	It is also possible to have a "disembodied" property list,
which is not associated with any symbol.
A disembodied property list is a cons.  Its car may be used for any purpose.
The property list resides in its cdr.
The way to create a disembodied property list is with <!-- open: 252, close: 251 --><font class="lisp">(ncons nil)</font><!-- open: 252, close: 252 --> <!-- MATCHED MATCHED MATCHED -->.
In all of the functions in this section, disembodied property lists
may be used as well as symbols; for brevity, the text speaks only of symbols.

<div class='defun' id='get'>
  <font class='exdent'>
    <font class='funcname'>get </font>
    <font class='italic' color='purple'>sym indicator</font>
  </font><br>
<!-- open: 253, close: 252 --><font class="italic">get</font><!-- open: 253, close: 253 --> <!-- MATCHED MATCHED MATCHED --> looks up <!-- open: 254, close: 253 --><font class="italic">sym</font><!-- open: 254, close: 254 --> <!-- MATCHED MATCHED MATCHED -->'s <!-- open: 255, close: 254 --><font class="italic">indicator</font><!-- open: 255, close: 255 --> <!-- MATCHED MATCHED MATCHED --> property.  If it finds such a property,
it returns the value; otherwise, it returns <!-- open: 256, close: 255 --><font class="lisp">nil</font><!-- open: 256, close: 256 --> <!-- MATCHED MATCHED MATCHED -->.
<pre class='lisp'>
<font class='exdent'>Example: If the property list of <!-- open: 257, close: 256 --><font class="lisp">foo</font><!-- open: 257, close: 257 --> <!-- MATCHED MATCHED MATCHED --> is <!-- open: 258, close: 257 --><font class="lisp">(baz 3)</font><!-- open: 258, close: 258 --> <!-- MATCHED MATCHED MATCHED --></font><!-- exdent -->(get 'foo 'baz) =&gt; 3
(get 'foo 'zoo) =&gt; nil
</pre>
<!-- What if sym is a number?  What happens? -->
<!-- a list or locative?? disembodied property list****** -->
</div>

<div class='defun' id='getl'>
  <font class='exdent'>
    <font class='funcname'>getl </font>
    <font class='italic' color='purple'>sym indicator-list</font>
  </font><br>
<!-- open: 259, close: 258 --><font class="lisp">getl</font><!-- open: 259, close: 259 --> <!-- MATCHED MATCHED MATCHED --> is like <!-- open: 260, close: 259 --><font class="lisp">get</font><!-- open: 260, close: 260 --> <!-- MATCHED MATCHED MATCHED -->, except that the second argument is a list
of indicators.  <!-- open: 261, close: 260 --><font class="lisp">getl</font><!-- open: 261, close: 261 --> <!-- MATCHED MATCHED MATCHED --> searches down <!-- open: 262, close: 261 --><font class="italic">sym</font><!-- open: 262, close: 262 --> <!-- MATCHED MATCHED MATCHED -->'s property list for any
of the indicators in <!-- open: 263, close: 262 --><font class="italic">indicator-list</font><!-- open: 263, close: 263 --> <!-- MATCHED MATCHED MATCHED -->, until it finds a property whose
indicator is one of the elements of <!-- open: 264, close: 263 --><font class="italic">indicator-list</font><!-- open: 264, close: 264 --> <!-- MATCHED MATCHED MATCHED -->.
	<!-- open: 265, close: 264 --><font class="lisp">getl</font><!-- open: 265, close: 265 --> <!-- MATCHED MATCHED MATCHED --> returns the portion of <!-- open: 266, close: 265 --><font class="italic">sym</font><!-- open: 266, close: 266 --> <!-- MATCHED MATCHED MATCHED -->'s property list beginning
with the first such property which it found.  So the <!-- open: 267, close: 266 --><font class="italic">car</font><!-- open: 267, close: 267 --> <!-- MATCHED MATCHED MATCHED --> of the returned
list is an indicator, and the <!-- open: 268, close: 267 --><font class="italic">cadr</font><!-- open: 268, close: 268 --> <!-- MATCHED MATCHED MATCHED --> is the property value.  If none
of the indicators on <!-- open: 269, close: 268 --><font class="italic">indicator-list</font><!-- open: 269, close: 269 --> <!-- MATCHED MATCHED MATCHED --> are on the property list, <!-- open: 270, close: 269 --><font class="lisp">getl</font><!-- open: 270, close: 270 --> <!-- MATCHED MATCHED MATCHED -->
returns <!-- open: 271, close: 270 --><font class="lisp">nil</font><!-- open: 271, close: 271 --> <!-- MATCHED MATCHED MATCHED -->.
<pre class='lisp'>
<font class='exdent'>Example:
</font><!-- exdent --><!-- open: 272, close: 271 --><font class="main">If the property list of</font><!-- open: 272, close: 272 --> <!-- MATCHED MATCHED MATCHED --> foo <!-- open: 273, close: 272 --><font class="main">were</font><!-- open: 273, close: 273 --> <!-- MATCHED MATCHED MATCHED -->
(bar (1 2 3) baz (3 2 1) color blue height six-two)
<!-- open: 274, close: 273 --><font class="main">then</font><!-- open: 274, close: 274 --> <!-- MATCHED MATCHED MATCHED -->
(getl 'foo '(baz height))
  =&gt; (baz (3 2 1) color blue height six-two)
</pre>
</div>

<div class='defun' id='putprop'>
  <font class='exdent'>
    <font class='funcname'>putprop </font>
    <font class='italic' color='purple'>sym x indicator</font>
  </font><br>
This gives <!-- open: 275, close: 274 --><font class="italic">sym</font><!-- open: 275, close: 275 --> <!-- MATCHED MATCHED MATCHED --> an <!-- open: 276, close: 275 --><font class="italic">indicator</font><!-- open: 276, close: 276 --> <!-- MATCHED MATCHED MATCHED -->-property of <!-- open: 277, close: 276 --><font class="italic">x</font><!-- open: 277, close: 277 --> <!-- MATCHED MATCHED MATCHED -->.
After this is done, <!-- open: 278, close: 277 --><font class="lisp">(get <!-- open: 279, close: 277 --><font class="italic">sym indicator</font><!-- open: 279, close: 278 -->)</font><!-- open: 279, close: 279 --> <!-- MATCHED MATCHED MATCHED --> will return <!-- open: 280, close: 279 --><font class="italic">x</font><!-- open: 280, close: 280 --> <!-- MATCHED MATCHED MATCHED -->.
<pre class='lisp'>
<font class='exdent'>Example:
</font><!-- exdent -->(putprop 'Nixon 'not 'crook)
</pre>

If <!-- open: 281, close: 280 --><font class="italic">sym</font><!-- open: 281, close: 281 --> <!-- MATCHED MATCHED MATCHED --> already has a property with the name <!-- open: 282, close: 281 --><font class="italic">indicator</font><!-- open: 282, close: 282 --> <!-- MATCHED MATCHED MATCHED -->, 
then that property is removed first; this insures that <!-- open: 283, close: 282 --><font class="lisp">getl</font><!-- open: 283, close: 283 --> <!-- MATCHED MATCHED MATCHED --> will always
find the property that was added most recently.
</div>

<div class='defspec' id='defprop'><font class='exdent'><font class='funcname' id='defprop'>defprop</font><font class="italic"> Special Form</font></br></font><!-- end font_exdent --><!-- open: 284, close: 283 --><font class="lisp">defprop</font><!-- open: 284, close: 284 --> <!-- MATCHED MATCHED MATCHED --> is a form of <!-- open: 285, close: 284 --><font class="lisp">putprop</font><!-- open: 285, close: 285 --> <!-- MATCHED MATCHED MATCHED --> with unevaluated arguments,
which is sometimes more convenient for typing.
<pre class='lisp'>
<font class='exdent'>Example:
</font><!-- exdent -->(defprop foo bar next-to)
</pre>
is the same as
<pre class='lisp'>
(putprop 'foo 'bar 'next-to)
</pre>
</div>

<div class='defun' id='remprop'>
  <font class='exdent'>
    <font class='funcname'>remprop </font>
    <font class='italic' color='purple'>sym indicator</font>
  </font><br>
This removes <!-- open: 286, close: 285 --><font class="italic">sym</font><!-- open: 286, close: 286 --> <!-- MATCHED MATCHED MATCHED -->'s <!-- open: 287, close: 286 --><font class="italic">indicator</font><!-- open: 287, close: 287 --> <!-- MATCHED MATCHED MATCHED --> property, by splicing it out of the property
list.  It returns that portion of <!-- open: 288, close: 287 --><font class="italic">sym</font><!-- open: 288, close: 288 --> <!-- MATCHED MATCHED MATCHED -->'s property list of which the
former <!-- open: 289, close: 288 --><font class="italic">indicator</font><!-- open: 289, close: 289 --> <!-- MATCHED MATCHED MATCHED -->-property was the <!-- open: 290, close: 289 --><font class="lisp">car</font><!-- open: 290, close: 290 --> <!-- MATCHED MATCHED MATCHED -->.
<pre class='lisp'>
<font class='exdent'>Example:
</font><!-- exdent --><!-- open: 291, close: 290 --><font class="main">If the property list of <!-- open: 292, close: 290 --><font class="lisp">foo</font><!-- open: 292, close: 291 --> was</font><!-- open: 292, close: 292 --> <!-- MATCHED MATCHED MATCHED -->
(color blue height six-three near-to bar)
<!-- open: 293, close: 292 --><font class="main">then</font><!-- open: 293, close: 293 --> <!-- MATCHED MATCHED MATCHED -->
(remprop 'foo 'height) =&gt; (six-three near-to bar)
<!-- open: 294, close: 293 --><font class="main">and <!-- open: 295, close: 293 --><font class="lisp">foo</font><!-- open: 295, close: 294 -->'s property list would be</font><!-- open: 295, close: 295 --> <!-- MATCHED MATCHED MATCHED -->
(color blue near-to bar)
</pre>
If <!-- open: 296, close: 295 --><font class="italic">sym</font><!-- open: 296, close: 296 --> <!-- MATCHED MATCHED MATCHED --> has no <!-- open: 297, close: 296 --><font class="italic">indicator</font><!-- open: 297, close: 297 --> <!-- MATCHED MATCHED MATCHED -->-property, then <!-- open: 298, close: 297 --><font class="lisp">remprop</font><!-- open: 298, close: 298 --> <!-- MATCHED MATCHED MATCHED --> has no side-effect
and returns <!-- open: 299, close: 298 --><font class="lisp">nil</font><!-- open: 299, close: 299 --> <!-- MATCHED MATCHED MATCHED -->.
</div>

<div class='defun' id='plist'>
  <font class='exdent'>
    <font class='funcname'>plist </font>
    <font class='italic' color='purple'>sym</font>
  </font><br>
This returns the property list of <!-- open: 300, close: 299 --><font class="italic">sym</font><!-- open: 300, close: 300 --> <!-- MATCHED MATCHED MATCHED -->.
</div>

<div class='defun' id='setplist'>
  <font class='exdent'>
    <font class='funcname'>setplist </font>
    <font class='italic' color='purple'>sym property-list</font>
  </font><br>
This sets the property list of <!-- open: 301, close: 300 --><font class="italic">sym</font><!-- open: 301, close: 301 --> <!-- MATCHED MATCHED MATCHED --> to <!-- open: 302, close: 301 --><font class="italic">property-list</font><!-- open: 302, close: 302 --> <!-- MATCHED MATCHED MATCHED -->.  <!-- open: 303, close: 302 --><font class="lisp">setplist</font><!-- open: 303, close: 303 --> <!-- MATCHED MATCHED MATCHED --> is to be used
with caution, since property lists sometimes contain internal system properties, which
are used by many useful system functions.  Also it is inadvisable to have the property
lists of two different symbols be <!-- open: 304, close: 303 --><font class="lisp">eq</font><!-- open: 304, close: 304 --> <!-- MATCHED MATCHED MATCHED -->, since the shared list structure will
cause unexpected effects on one symbol if <!-- open: 305, close: 304 --><font class="lisp">putprop</font><!-- open: 305, close: 305 --> <!-- MATCHED MATCHED MATCHED --> or <!-- open: 306, close: 305 --><font class="lisp">remprop</font><!-- open: 306, close: 306 --> <!-- MATCHED MATCHED MATCHED --> is done to the other.
</div>

<div class='defun' id='property-cell-location'>
  <font class='exdent'>
    <font class='funcname'>property-cell-location </font>
    <font class='italic' color='purple'>sym</font>
  </font><br>
This returns a locative pointer to the location of <!-- open: 307, close: 306 --><font class="italic">sym</font><!-- open: 307, close: 307 --> <!-- MATCHED MATCHED MATCHED -->'s property-list
cell.  See the section on locatives.
</div>

<div class='section' id='8.4'>8.4 The Print Name</div><p class='cindent' id='disembodied-property-list'><!-- "print name" -->
Every symbol has an associated string called the <!-- open: 308, close: 307 --><font class="italic">print-name</font><!-- open: 308, close: 308 --> <!-- MATCHED MATCHED MATCHED -->, or <!-- open: 309, close: 308 --><font class="italic">pname</font><!-- open: 309, close: 309 --> <!-- MATCHED MATCHED MATCHED -->
for short.  This string is used as the external representation of the symbol:
if the string is typed in to <!-- open: 310, close: 309 --><font class="lisp">read</font><!-- open: 310, close: 310 --> <!-- MATCHED MATCHED MATCHED -->, it is read as a reference to that symbol
(if it is interned), and if the symbol is <!-- open: 311, close: 310 --><font class="italic">print</font><!-- open: 311, close: 311 --> <!-- MATCHED MATCHED MATCHED -->ed, <!-- open: 312, close: 311 --><font class="lisp">print</font><!-- open: 312, close: 312 --> <!-- MATCHED MATCHED MATCHED --> types out the
print-name.
For more information, see the section on the <!-- open: 313, close: 312 --><font class="italic">reader</font><!-- open: 313, close: 313 --> <!-- MATCHED MATCHED MATCHED -->
(see <font color='red'>LINK:(</font>reader)) and <!-- open: 314, close: 313 --><font class="italic">printer</font><!-- open: 314, close: 314 --> <!-- MATCHED MATCHED MATCHED --> (see <font color='red'>LINK:(</font>printer)).

<div class='defun' id='samepnamep'>
  <font class='exdent'>
    <font class='funcname'>samepnamep </font>
    <font class='italic' color='purple'>sym1 sym2</font>
  </font><br>
This predicate returns <!-- open: 315, close: 314 --><font class="lisp">t</font><!-- open: 315, close: 315 --> <!-- MATCHED MATCHED MATCHED --> if the two symbols <!-- open: 316, close: 315 --><font class="italic">sym1</font><!-- open: 316, close: 316 --> <!-- MATCHED MATCHED MATCHED --> and <!-- open: 317, close: 316 --><font class="italic">sym2</font><!-- open: 317, close: 317 --> <!-- MATCHED MATCHED MATCHED --> have
<!-- open: 318, close: 317 --><font class="lisp">equal</font><!-- open: 318, close: 318 --> <!-- MATCHED MATCHED MATCHED --> print-names; that is, if their printed representation is the same.
Upper and lower case letters are normally considered the same.
If either or both of the arguments is a string instead of a symbol, then that
string is used in place of the print-name.
<pre class='lisp'>
<font class='exdent'>Examples:
</font><!-- exdent -->(samepnamep 'xyz (maknam '(x y z)) =&gt; t

(samepnamep 'xyz (maknam '(w x y)) =&gt; nil

(samepnamep 'xyz "xyz") =&gt; t
</pre>

This is the same function as <!-- open: 319, close: 318 --><font class="lisp">string-equal</font><!-- open: 319, close: 319 --> <!-- MATCHED MATCHED MATCHED --> (see <font color='red'>LINK:(</font>string-equal-fun)).
</div>

<div class='defun' id='get-pname'>
  <font class='exdent'>
    <font class='funcname'>get-pname </font>
    <font class='italic' color='purple'>sym</font>
  </font><br>
This returns the print-name of the symbol <!-- open: 320, close: 319 --><font class="italic">sym</font><!-- open: 320, close: 320 --> <!-- MATCHED MATCHED MATCHED -->.
<pre class='lisp'>
<font class='exdent'>Example:
</font><!-- exdent -->(get-pname 'xyz) =&gt; "xyz"
</pre>
</div>

<div class='defun' id='print-name-cell-location'>
  <font class='exdent'>
    <font class='funcname'>print-name-cell-location </font>
    <font class='italic' color='purple'>sym</font>
  </font><br>
This returns a locative pointer to the location of <!-- open: 321, close: 320 --><font class="italic">sym</font><!-- open: 321, close: 321 --> <!-- MATCHED MATCHED MATCHED -->'s
print-name cell.  See the section on locatives. 
Note that the contents of this cell is not actually the print name,
but the symbol header, an object which may not be directly manipulated.
Use <!-- open: 322, close: 321 --><font class="lisp">get-pname</font><!-- open: 322, close: 322 --> <!-- MATCHED MATCHED MATCHED -->, the microcode primitive which knows how to
extract the pname from the symbol header.
</div>

<div class='section' id='8.5'>8.5 The Creation and Interning of Symbols</div><p class='cindent'><!-- "intern" -->
	Normally, one wants to refer to the same symbol every
time the same print-name-like string is typed.  So, when
<!-- open: 323, close: 322 --><font class="lisp">read</font><!-- open: 323, close: 323 --> <!-- MATCHED MATCHED MATCHED --> sees such a character-string in the input to Lisp,
it looks in a table called the <!-- open: 324, close: 323 --><font class="italic">obarray</font><!-- open: 324, close: 324 --> <!-- MATCHED MATCHED MATCHED --> for some symbol
with that print-name.  If it finds such a symbol, then that is what it
returns; otherwise, it creates a symbol with that print-name (using
the <!-- open: 325, close: 324 --><font class="lisp">make-symbol</font><!-- open: 325, close: 325 --> <!-- MATCHED MATCHED MATCHED --> function, see below), enters that symbol
on the obarray, and returns it.  The sub-function of <!-- open: 326, close: 325 --><font class="lisp">read</font><!-- open: 326, close: 326 --> <!-- MATCHED MATCHED MATCHED --> which performs
these functions is called <!-- open: 327, close: 326 --><font class="lisp">intern</font><!-- open: 327, close: 327 --> <!-- MATCHED MATCHED MATCHED -->, and when a symbol has been entered
on the obarray it is said to be <!-- open: 328, close: 327 --><font class="italic">interned</font><!-- open: 328, close: 328 --> <!-- MATCHED MATCHED MATCHED -->.

	A symbol can also be <!-- open: 329, close: 328 --><font class="italic">uninterned</font><!-- open: 329, close: 329 --> <!-- MATCHED MATCHED MATCHED -->, indicating that it is not
on the obarray and cannot be referred to simply by typing its print
name.  Such symbols can be used as objects within a data-structure,
but can cause trouble during debugging because they cannot be "typed in"
directly, yet they look just like interned symbols when "typed out".

	Actually there can be many obarrays; the Lisp Machine system
includes a feature called the <!-- open: 330, close: 329 --><font class="italic">package system</font><!-- open: 330, close: 330 --> <!-- MATCHED MATCHED MATCHED --> (see <font color='red'>LINK:(</font>package)) which keeps track
of multiple <!-- open: 331, close: 330 --><font class="italic">packages</font><!-- open: 331, close: 331 --> <!-- MATCHED MATCHED MATCHED --> or <!-- open: 332, close: 331 --><font class="italic">name spaces</font><!-- open: 332, close: 332 --> <!-- MATCHED MATCHED MATCHED --> and their interrelationships,
using separate obarrays for each package.

<div class='defun' id='make-symbol'>
  <font class='exdent'>
    <font class='funcname'>make-symbol </font>
    <font class='italic' color='purple'>pname &optional permanent-p</font>
  </font><br>
This creates a new uninterned symbol, whose print-name is the string <!-- open: 333, close: 332 --><font class="italic">pname</font><!-- open: 333, close: 333 --> <!-- MATCHED MATCHED MATCHED -->.
The value and function bindings will be unbound, the property list will be empty,
and the package will be <!-- open: 334, close: 333 --><font class="lisp">nil</font><!-- open: 334, close: 334 --> <!-- MATCHED MATCHED MATCHED -->.  If <!-- open: 335, close: 334 --><font class="italic">permanent-p</font><!-- open: 335, close: 335 --> <!-- MATCHED MATCHED MATCHED --> is specified, the symbol
is going to be interned and kept around forever; in this case it and its pname
will be put in the proper areas.  If <!-- open: 336, close: 335 --><font class="italic">permanent-p</font><!-- open: 336, close: 336 --> <!-- MATCHED MATCHED MATCHED --> is <!-- open: 337, close: 336 --><font class="lisp">nil</font><!-- open: 337, close: 337 --> <!-- MATCHED MATCHED MATCHED --> (the default),
nothing special is done with areas.
<pre class='lisp'>
<font class='exdent'>Examples:
</font><!-- exdent -->(setq a (make-symbol "foo")) =&gt; foo
(symeval a) =&gt; ERROR!
</pre>
Note that the symbol is <!-- open: 338, close: 337 --><font class="italic">not</font><!-- open: 338, close: 338 --> <!-- MATCHED MATCHED MATCHED --> interned; it is simply created and returned.
</div>

<div class='defun' id='copysymbol'>
  <font class='exdent'>
    <font class='funcname'>copysymbol </font>
    <font class='italic' color='purple'>sym copy-p</font>
  </font><br>
This returns a new uninterned symbol with the same print-name
as <!-- open: 339, close: 338 --><font class="italic">sym</font><!-- open: 339, close: 339 --> <!-- MATCHED MATCHED MATCHED -->.  If <!-- open: 340, close: 339 --><font class="italic">copy-p</font><!-- open: 340, close: 340 --> <!-- MATCHED MATCHED MATCHED --> is non-<!-- open: 341, close: 340 --><font class="lisp">nil</font><!-- open: 341, close: 341 --> <!-- MATCHED MATCHED MATCHED -->, then the initial
value and function-definition of the new symbol will
be the same as those of <!-- open: 342, close: 341 --><font class="italic">sym</font><!-- open: 342, close: 342 --> <!-- MATCHED MATCHED MATCHED -->, and the property list of
the new symbol will be a copy of <!-- open: 343, close: 342 --><font class="italic">sym</font><!-- open: 343, close: 343 --> <!-- MATCHED MATCHED MATCHED -->'s.  If <!-- open: 344, close: 343 --><font class="italic">copy-p</font><!-- open: 344, close: 344 --> <!-- MATCHED MATCHED MATCHED -->
is <!-- open: 345, close: 344 --><font class="lisp">nil</font><!-- open: 345, close: 345 --> <!-- MATCHED MATCHED MATCHED -->, then the new symbol will be unbound and undefined, and
its property list will be <!-- open: 346, close: 345 --><font class="lisp">nil</font><!-- open: 346, close: 346 --> <!-- MATCHED MATCHED MATCHED -->.
</div>

<div class='defun' id='gensym'>
  <font class='exdent'>
    <font class='funcname'>gensym </font>
    <font class='italic' color='purple'>&optional x</font>
  </font><br>
<!-- open: 347, close: 346 --><font class="lisp">gensym</font><!-- open: 347, close: 347 --> <!-- MATCHED MATCHED MATCHED --> invents a print-name, and creates a new symbol with that print-name.
It returns the new, uninterned symbol.

	The invented print-name is a character prefix (the value of <!-- open: 348, close: 347 --><font class="lisp">si:*gensym-prefix</font><!-- open: 348, close: 348 --> <!-- MATCHED MATCHED MATCHED -->)
followed by the decimal representation of a number (the value of <!-- open: 349, close: 348 --><font class="lisp">si:*gensym-counter</font><!-- open: 349, close: 349 --> <!-- MATCHED MATCHED MATCHED -->),
e.g. "g0001".  The number is increased by one every time <!-- open: 350, close: 349 --><font class="lisp">gensym</font><!-- open: 350, close: 350 --> <!-- MATCHED MATCHED MATCHED --> is called.

	If the argument <!-- open: 351, close: 350 --><font class="italic">x</font><!-- open: 351, close: 351 --> <!-- MATCHED MATCHED MATCHED --> is present and is a fixnum, then <!-- open: 352, close: 351 --><font class="lisp">si:*gensym-counter</font><!-- open: 352, close: 352 --> <!-- MATCHED MATCHED MATCHED --> is
set to <!-- open: 353, close: 352 --><font class="italic">x</font><!-- open: 353, close: 353 --> <!-- MATCHED MATCHED MATCHED -->.  If <!-- open: 354, close: 353 --><font class="italic">x</font><!-- open: 354, close: 354 --> <!-- MATCHED MATCHED MATCHED --> is a string or a symbol, then <!-- open: 355, close: 354 --><font class="lisp">si:*gensym-prefix</font><!-- open: 355, close: 355 --> <!-- MATCHED MATCHED MATCHED --> is set to
the first character of the string or of the print-name.
After handling the argument, <!-- open: 356, close: 355 --><font class="lisp">gensym</font><!-- open: 356, close: 356 --> <!-- MATCHED MATCHED MATCHED --> creates a symbol as it would with no argument.
<pre class='lisp'>
<font class='exdent'>Examples:
</font><!-- exdent --><!-- open: 357, close: 356 --><font class="main">if</font><!-- open: 357, close: 357 --> <!-- MATCHED MATCHED MATCHED -->   (gensym) =&gt; g0007
<!-- open: 358, close: 357 --><font class="main">then</font><!-- open: 358, close: 358 --> <!-- MATCHED MATCHED MATCHED --> (gensym 'foo) =&gt; f0008
     (gensym 40) =&gt; f0032
     (gensym) =&gt; f0033
</pre>
	Note that the number is in decimal and always has four digits, and the prefix is
always one character.

	<!-- open: 359, close: 358 --><font class="lisp">gensym</font><!-- open: 359, close: 359 --> <!-- MATCHED MATCHED MATCHED --> is usually used to create a symbol which should not normally
be seen by the user, and whose print-name is unimportant, except to
allow easy distinction by eye between two such symbols.
The optional argument is rarely supplied.
The name comes from "generate symbol", and the symbols produced by it
are often called "gensyms".
</div>

<div class='defun' id='package-cell-location'>
  <font class='exdent'>
    <font class='funcname'>package-cell-location </font>
    <font class='italic' color='purple'>symbol</font>
  </font><br>
Returns a locative pointer to <!-- open: 360, close: 359 --><font class="italic">symbol</font><!-- open: 360, close: 360 --> <!-- MATCHED MATCHED MATCHED -->'s package cell, which contains
the package (see <font color='red'>LINK:(</font>package)) which owns <!-- open: 361, close: 360 --><font class="italic">symbol</font><!-- open: 361, close: 361 --> <!-- MATCHED MATCHED MATCHED -->.
</div>

<!-- eof -->
</body>
</html>

